package com.ruoyi.partybuilding.domain;

import java.util.Date;
import java.util.List;

import com.easy.query.core.annotation.ColumnIgnore;
import com.easy.query.core.annotation.EasyWhereCondition;
import com.easy.query.core.annotation.Table;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.partybuilding.common.EQuery.IDeptEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.*;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import static com.easy.query.core.annotation.EasyWhereCondition.Condition.GREATER_THAN_EQUAL;

/**
 * 会议信息对象 pb_meeting_info
 * 
 * @author he-liangliang@outlook.com
 * @date 2024-11-27
 */
@Table("pb_meeting_info")
@Data
public class MeetingInfo extends IDeptEntity.LongId {
    private static final long serialVersionUID = 1L;

    /** 会议类型 ; */
    //@ApiModelProperty(value = "会议类型")
//    @Excel(name = "会议类型")
//    private String typeName;

    /** 状态 0未开始1进行中2已结束; */
    @ApiModelProperty(value = "状态,0未开始1进行中2已结束")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "会议进度",readConverterExp = "0=未开始,1=进行中,2=已结束",sort = 8)
    private Long status;

    /** 会议名称 ; */
    @ApiModelProperty(value = "会议名称")
    @EasyWhereCondition()
    @Excel(name = "会议名称",sort = 1)
    private String title;

    /** 开始时间 ; */
    @ApiModelProperty(value = "开始时间")
    @EasyWhereCondition(type =EasyWhereCondition.Condition.GREATER_THAN_EQUAL )
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 5)
    private Date startTime;

    /** 时长,分钟 ; */
    @ApiModelProperty(value = "时长,分钟")
    @Excel(name = "时长(分钟)",sort = 6)
    private Long durtion;

    /** 部门id ; */
    @ApiModelProperty(value = "部门id")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    private Long deptId;

    /** 组织名称 ; */
    @ApiModelProperty(value = "组织名称")
    @Excel(name = "组织名称",sort = 2)
    private String deptName;

    /** 会议类型，字典表meeting_type ; */
    @ApiModelProperty(value = "会议类型，字典表meeting_type")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "会议类型",dictType = "pb_meeting_type",sort = 3)
    private String typeCode;

    /** 会议议题，字典表meeting_topic ; */
    @ApiModelProperty(value = "会议议题，字典表meeting_topic")
    @Excel(name = "会议议题",dictType = "pb_meeting_topic",sort = 10)
    private String meetingTopic;

    /** 会议形式,0线下，1直播 ; */
    @ApiModelProperty(value = "会议形式,0线下，1直播")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "会议形式",readConverterExp = "0=线下,1=直播",sort = 7)
    private Long meetingWay;

    /** 具体形式 ; */
    @ApiModelProperty(value = "具体形式")
    @Excel(name = "具体形式")
    private String detailWay;

    /** 签到方式，0扫码 ; */
    @ApiModelProperty(value = "签到方式，0扫码")
    private Long signWay;

    /** 会议地点 ; */
    @ApiModelProperty(value = "会议地点")
    @Excel(name = "会议地点")
    private String meetingAddr;

    /** 详细地址 ; */
    @ApiModelProperty(value = "详细地址")
    @Excel(name = "详细地址")
    private String detailAddr;

    /** 参会人员,json[] ; */
    @ApiModelProperty(value = "参会人员,json[]")
    private String users;

    @ApiModelProperty("与users对应的用户列表，仅单个会议查询时有值")
    @ColumnIgnore
    List<SysUserRef> userList;
    /** 列席人员 ; */
    @ApiModelProperty(value = "列席人员")
    private String attendance;

    /** 会议内容 ; */
    @ApiModelProperty(value = "会议内容")
    //@Excel(name = "会议内容")
    private String content;

    /** 附件地址,json[] ; */
    @ApiModelProperty(value = "附件地址,json[]")
    private String fileUrl;

    /** 创建人 ; */
    @ApiModelProperty(value = "创建人")
    private Long creatorId;

    @ApiModelProperty(value = "创建人名称")
    String createBy;
    Date createTime;

    /** 会议记录 */
    @ApiModelProperty("会议纪要")
    String record;

    @ApiModelProperty("开启签到时间,未开启时为null")
    Date signBegin;

    @ApiModelProperty("会议开启后签到结束延迟时间,分钟,字典pb_meeting_sign_delay值")
    Integer signDelay;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            //.append("typeName", getTypeName())
            .append("status", getStatus())
            .append("title", getTitle())
            .append("startTime", getStartTime())
            .append("durtion", getDurtion())
            .append("deptId", getDeptId())
            .append("deptName", getDeptName())
            .append("typeCode", getTypeCode())
            .append("meetingTopic", getMeetingTopic())
            .append("meetingWay", getMeetingWay())
            .append("detailWay", getDetailWay())
            .append("signWay", getSignWay())
            .append("meetingAddr", getMeetingAddr())
            .append("detailAddr", getDetailAddr())
            .append("users", getUsers())
            .append("attendance", getAttendance())
            .append("content", getContent())
            .append("fileUrl", getFileUrl())
            .append("createrId", getCreatorId())
            .append("createTime", getCreateTime())
            .toString();
    }
}
